package com.yuw.threaddemo;

/**
 * 产品类
 */
public class Goods {
    // 属性
    // 商品名
    private String goodName;
    // 价格
    private double goodPrice;
    // 行为

    public Goods(String goodName, double goodPrice) {
        this.goodName = goodName;
        this.goodPrice = goodPrice;
    }

    public String getGoodName() {
        return goodName;
    }

    public void setGoodName(String goodName) {
        this.goodName = goodName;
    }

    public double getGoodPrice() {
        return goodPrice;
    }

    public void setGoodPrice(double goodPrice) {
        this.goodPrice = goodPrice;
    }

    // 打印商品信息

    @Override
    public String toString() {
        return "Goods{" +
                "goodName='" + goodName + '\'' +
                ", goodPrice='" + goodPrice + '\'' +
                '}';
    }
}
